<?php
define( 'ROOT_PATH', dirname( __FILE__ ) ."/../" );
//if(file_exists(ROOT_PATH.'license.oplf')) { $license = file_get_contents(ROOT_PATH.'license.oplf'); }
$license = ' ';
$request = "<?xml version=\"1.0\"?>
<oPanelAPI>
<function>oPconnect</function>
	<values>
		<ver>3 BETA</ver>
		<verlong>3.0.2</verlong>
		<license>$license</license>
		<domain>$_SERVER[SERVER_NAME]</domain>
		<server>$_ENV[HOSTNAME]</server>
		<beta>true</beta>
		<betaID></betaID>
	</values>
</oPanelAPI>";

$url = "http://opanel.servehttp.com/server.php";  

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request); 
// what to post
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$result = curl_exec($ch);
curl_close($ch);

echo '<pre>';
 echo "\n";
 echo "Sending request to server:\n";
 echo htmlspecialchars($request)."\n\nServerReply:\n";
 echo htmlspecialchars($result);
 echo "\n";
echo '</pre>';

//print $result;
?>